home *** CD-ROM | disk | FTP | other *** search
/ BCI NET / BCI NET Dec 94.iso / archives / programming / languages / frexxedv10.lha / fpl / TabSpace.FPL < prev    next >
Encoding:
Text File  |  1994-09-22  |  651 b   |  27 lines

  1. /**************************************************************
  2.  *
  3.  *  Name:  TabSpace()
  4.  *
  5.  *  Function:  Construct a lokal bool environment variable  - 'tab_space'.
  6.  *             Assign the tab key to execute the TabSpace() function
  7.  *             if the varieble is TRUE.
  8.  *
  9.  *  Author:  Kjell Ericson
  10.  *********/
  11. export int TabSpace()
  12. {
  13.   string str="";
  14.   int tabsize=ReadInfo("tab_size");
  15.   int antal=tabsize-((ReadInfo("cursor_x")+ReadInfo("screen_x")-1)%tabsize);
  16.  
  17.   while (antal-->0)
  18.     str=joinstr(str, " ");
  19.  
  20.   Output(str);
  21.  
  22. }
  23.  
  24. ConstructInfo("tab_space", "", "", "BLW(display)", "", 0, 1);
  25. AssignKey("TabSpace();", "'tab'", "tab_space");
  26.  
  27.